package com.itheima.health.dao;

import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;
@Mapper
public interface OrderDao {
    List<Map<String,Object>> findSetmealCount();

    /**
     * 根据会员、日期、套餐查询
     *  @param memberId  会员ID
     *  @param setmealId 套餐ID
     *  @param orderDate 预约日期
     * @return
     */
    long countByMemberAndDateAndSetMeal(@Param("memberId") Integer memberId, @Param("orderDate") Date orderDate, @Param("setmealId") Integer setmealId);
    /**
     * 插入
     * @param order
     */
    void insert(Order order);

    /**
     * 根据ID查询
     * @param id
     * @return
     */
    Order selectById(@Param("id") Integer id);
}
